<template>
  <div class="home-page">
    首页
    <!-- 首页 -->
    <i class="iconfont icon-home" />
    <i class="iconfont icon-home-sel" />
    <!-- 问答 -->
    <i class="iconfont icon-qa" />
    <i class="iconfont icon-qa-sel" />
    <!-- 视频 -->
    <i class="iconfont icon-video" />
    <i class="iconfont icon-video-sel" />
    <!-- 我的 -->
    <i class="iconfont icon-mine" />
    <i class="iconfont icon-mine-sel" />
  </div>
</template>

<script>
import { getAllChannels } from '@/api/channel'
export default {
  name: 'Home-page',
  async created () {
    // 通过数组解构语法提取err和res，如果err为null说明没有异常
    const [err, res] = await getAllChannels()
    if (err) return console.log('失败', err.message)
    console.log('成功', res.data)
  }
}

</script>

<style scoped lang="less">
</style>
